﻿using System;
using System.Linq;

namespace BOL.Apps.GeneNetworkBrowser
{
    public static class EnumerableNetwork
    {
        public static double Activity(this Network network, string id)
        {
            return network.Vertices.Sum(x => x.Attributes["id"]) / Math.Sqrt(network.VertexCount);
        }
    }
}
